package com.example.controller;

import com.example.feignApi.ProductFeignApiWithSentinel;
import com.example.mall.Product;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName OrderController
 * @Description TODO
 * @Author: XMK
 * @Date: 2020/4/29 18:55
 * @Version: 1.0
 */
@RestController
public class OrderController {
    @Autowired
    private ProductFeignApiWithSentinel productFeignApiWithSentinel;

    @GetMapping("/selectOrderById/{orderId}")
    public Product selectOrderById(@PathVariable String orderId) {
        return productFeignApiWithSentinel.selectProductByOrderId(orderId);
    }
}
